(function(){"use strict";BX.namespace("BX.Fileman.Google");BX.Fileman.Google.getGoogleLatLng=function(e){return new google.maps.LatLng(e[0],e[1])};BX.Fileman.Google.getLatLng=function(e){return[e.lat(),e.lng()]};BX.Fileman.Google.Loader=function(){this.apiKey=null;this.initProgress=false;this.inited=false;this.initStack=[]};BX.Fileman.Google.Loader.prototype.init=function(e){this.apiKey=BX.message("GOOGLE_MAP_API_KEY");if(!this.apiKey){this.throwError("No Google API key!");return}if(!this.inited){this.initStack.push(e)}if(!!window.google&&!!window.google.maps){this.resolveInit()}else if(!this.initProgress){this.initProgress=true;var i=this.getGoogleLang(BX.message("LANGUAGE_ID"));BX.loadScript(location.protocol+"//maps.google.com/maps/api/js?key="+BX.util.urlencode(this.apiKey)+"&libraries=places&language="+i,BX.delegate(this.resolveInit,this))}return this};BX.Fileman.Google.Loader.prototype.getGoogleLang=function(e){var i={br:"pt-BR",la:"es",sc:"zh-CN",tc:"zh-TW",vn:"vi",ua:"uk"};return typeof i[e]!=="undefined"?i[e]:e};BX.Fileman.Google.Loader.prototype.resolveInit=function(){this.inited=true;this.init=function(e){if(BX.type.isFunction(e)){e.apply(this,[])}};var e;while(e=this.initStack.shift()){this.init(e)}};BX.Fileman.Google.Loader.prototype.throwError=function(e){console.error("BX.Fileman.Google.Loader: "+e?e.message:"Google error!")};BX.Fileman.Google.Loader=new BX.Fileman.Google.Loader})();
//# sourceMappingURL=loader.map.js